/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package clusteranalyst2;

/**
 *
 * @author Administrator
 */
import Acquaintance.IACluster;
import Control.CCache;

/**
 *
 * @author jlh
 */
public class Parent {

    public int PID;
/**
 *
 * @param pid
 */
    public Parent(int pid) {
        this.PID = pid;
    }
/**
 *
 * @param basicID
 * @return
 */
    public boolean hasChildren(int basicID) {
        boolean haschildren = false;
        if (PID >= basicID) {
            haschildren = true;
        } else {
            haschildren = false;
        }

        return haschildren;
    }
/**
 *
 * @return
 */
    public int[] getChildren() {
        int[] children = new int[2];
        IACluster cluster = CCache.getCache().getParent(PID);
        children[0] = cluster.getEchild1();
        children[1] = cluster.getEchild2();
        return children;
    }


}

